@extends('base')

@section('content')
<div class="col-lg-12">
    <h1 class="page-header">Purchase Orders</h1>
</div>


<!-- will be used to show any messages -->
@if (Session::has('message'))
<div class="col-lg-12 alert alert-info">{{ Session::get('message') }}</div>
@endif
<div class="col-sm-12" style="padding-bottom: 10px">
    <a class="btn btn-primary" href="{{ url('purchaseorders/create') }}"><i class="fa fa-plus"></i> Add Order</a>
</div>

<div class="panel-body">
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover" id="customers">
            <thead>
            <tr>
                <th>ID</th>
                <th>Vendor</th>
                <th>Shipping Address</th>
                <th>Created</th>
                <th>Status</th>
            </tr>
            </thead>
        </table>

    </div>
    @stop

    @section('script')
    <script src="/mar/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="/mar/js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#purchaseOrders-table").dataTable( {
                "bProcessing": true,
                "bServerSide": true,
                "sAjaxSource": "purchaseorders   /datatable"
            } );
        } );
    </script>

    @stop